package com;

import java.io.IOException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.service.UserService;


/****
 * 消费者 启动类
 *
 */
public class Main {

	public static void main(String[] args) throws IOException {
		ClassPathXmlApplicationContext app = new ClassPathXmlApplicationContext("consumer.xml");
		UserService userService = (UserService) app.getBean("userService");
		String name = userService.getList(2);
		System.out.println("name:" + name);
		//System.in.read(); // 让程序阻塞   添加上这行代码 可以让消费者在dubbo-admin中注册到
	}
}
